﻿
/*============== simpleIRC - http://matthias.van-eeghem.com/ ==============*
 *                                                                         *
 *  File: CommandsWindow.xaml.cs                                            *
 *  Project: simpleIRC                                                     *
 *  Author(s): Matthias Van Eeghem <matthias@van-eeghem.com>               *
 *                                                                         *
 * ========================================================================*
 *                                                                         *
 *  This program is free software: you can redistribute it and/or modify   *
 *  it under the terms of the GNU General Public License as published by   *
 *  the Free Software Foundation, either version 3 of the License, or      *
 *  (at your option) any later version.                                    *
 *                                                                         *
 *  This program is distributed in the hope that it will be useful,        *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
 *  GNU General Public License for more details.                           *
 *                                                                         *
 *  You should have received a copy of the GNU General Public License      *
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
 *                                                                         *
===========================================================================*/

using System.Windows;

namespace simpleIRC.UI
{
    /// <summary>
    /// Interaction logic for ConnectWindow.xaml
    /// </summary>
    
    public partial class CommandsWindow : Window
    {
        private MainWindow mainWindow = null;

        /// <summary>
        /// The constructor of the CommandsWindow class
        /// </summary>
        /// <param name="parentWindow">The reference to the mainWindow object</param>
        
        public CommandsWindow(MainWindow parentWindow)
        {
            InitializeComponent();

            mainWindow = parentWindow;
        }

        /// <summary>
        /// Called when the main form is closed.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            mainWindow.CommandsWindow = null;
        }
    }
}
